package com.backom.client;

import java.util.Properties;

import javax.mail.Address;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMessage.RecipientType;

public class SendClient {

	public static void main(String[] args) {

		Properties props = new Properties();
		Session session = Session.getDefaultInstance(props);
		
		Message message = new MimeMessage(session);
		try {
			message.setContent("woshinidebaobao", "text/plain");
			message.setSubject("myfirstmail");
			Address fromAddr = new InternetAddress("backom13@163.com");
			Address toAddr = new InternetAddress("136905939@qq.com");
			message.setFrom(fromAddr);
			message.addRecipient(RecipientType.TO, toAddr);
			
		} catch (MessagingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
